Integrand size = 31, antiderivative size = 181 \[ \int \frac {\sec (e+f x)}{(a+a \sec (e+f x))^3 (c+d \sec (e+f x))} \, dx=-\frac {2 d^3 \text {arctanh}\left (\frac {\sqrt {c-d} \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {c+d}}\right )}{a^3 (c-d)^{7/2} \sqrt {c+d} f}+\frac {\tan (e+f x)}{5 (c-d) f (a+a \sec (e+f x))^3}+\frac {(2 c-7 d) \tan (e+f x)}{15 a (c-d)^2 f (a+a \sec (e+f x))^2}+\frac {\left (2 c^2-9 c d+22 d^2\right ) \tan (e+f x)}{15 (c-d)^3 f \left (a^3+a^3 \sec (e+f x)\right )} \]
-2*d^3*arctanh((c-d)^(1/2)*tan(1/2*f*x+1/2*e)/(c+d)^(1/2))/a^3/(c-d)^(7/2) /f/(c+d)^(1/2)+1/5*tan(f*x+e)/(c-d)/f/(a+a*sec(f*x+e))^3+1/15*(2*c-7*d)*ta n(f*x+e)/a/(c-d)^2/f/(a+a*sec(f*x+e))^2+1/15*(2*c^2-9*c*d+22*d^2)*tan(f*x+ e)/(c-d)^3/f/(a^3+a^3*sec(f*x+e))
Result contains complex when optimal does not.
Time = 3.16 (sec) , antiderivative size = 345, normalized size of antiderivative = 1.91 \[ \int \frac {\sec (e+f x)}{(a+a \sec (e+f x))^3 (c+d \sec (e+f x))} \, dx=\frac {\cos \left (\frac {1}{2} (e+f x)\right ) \left (\frac {480 d^3 \arctan \left (\frac {(i \cos (e)+\sin (e)) \left (c \sin (e)+(-d+c \cos (e)) \tan \left (\frac {f x}{2}\right )\right )}{\sqrt {c^2-d^2} \sqrt {(\cos (e)-i \sin (e))^2}}\right ) \cos ^5\left (\frac {1}{2} (e+f x)\right ) (i \cos (e)+\sin (e))}{\sqrt {c^2-d^2} \sqrt {(\cos (e)-i \sin (e))^2}}+\sec \left (\frac {e}{2}\right ) \left (5 \left (8 c^2-27 c d+37 d^2\right ) \sin \left (\frac {f x}{2}\right )-15 \left (2 c^2-7 c d+9 d^2\right ) \sin \left (e+\frac {f x}{2}\right )+20 c^2 \sin \left (e+\frac {3 f x}{2}\right )-75 c d \sin \left (e+\frac {3 f x}{2}\right )+115 d^2 \sin \left (e+\frac {3 f x}{2}\right )-15 c^2 \sin \left (2 e+\frac {3 f x}{2}\right )+45 c d \sin \left (2 e+\frac {3 f x}{2}\right )-45 d^2 \sin \left (2 e+\frac {3 f x}{2}\right )+7 c^2 \sin \left (2 e+\frac {5 f x}{2}\right )-24 c d \sin \left (2 e+\frac {5 f x}{2}\right )+32 d^2 \sin \left (2 e+\frac {5 f x}{2}\right )\right )\right )}{30 a^3 (c-d)^3 f (1+\cos (e+f x))^3} \]
(Cos[(e + f*x)/2]*((480*d^3*ArcTan[((I*Cos[e] + Sin[e])*(c*Sin[e] + (-d + c*Cos[e])*Tan[(f*x)/2]))/(Sqrt[c^2 - d^2]*Sqrt[(Cos[e] - I*Sin[e])^2])]*Co s[(e + f*x)/2]^5*(I*Cos[e] + Sin[e]))/(Sqrt[c^2 - d^2]*Sqrt[(Cos[e] - I*Si n[e])^2]) + Sec[e/2]*(5*(8*c^2 - 27*c*d + 37*d^2)*Sin[(f*x)/2] - 15*(2*c^2 - 7*c*d + 9*d^2)*Sin[e + (f*x)/2] + 20*c^2*Sin[e + (3*f*x)/2] - 75*c*d*Si n[e + (3*f*x)/2] + 115*d^2*Sin[e + (3*f*x)/2] - 15*c^2*Sin[2*e + (3*f*x)/2 ] + 45*c*d*Sin[2*e + (3*f*x)/2] - 45*d^2*Sin[2*e + (3*f*x)/2] + 7*c^2*Sin[ 2*e + (5*f*x)/2] - 24*c*d*Sin[2*e + (5*f*x)/2] + 32*d^2*Sin[2*e + (5*f*x)/ 2])))/(30*a^3*(c - d)^3*f*(1 + Cos[e + f*x])^3)
Time = 0.48 (sec) , antiderivative size = 294, normalized size of antiderivative = 1.62, number of steps used = 13, number of rules used = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.387, Rules used = {3042, 4475, 115, 25, 27, 169, 25, 27, 169, 27, 104, 218}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\sec (e+f x)}{(a \sec (e+f x)+a)^3 (c+d \sec (e+f x))} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\csc \left (e+f x+\frac {\pi }{2}\right )}{\left (a \csc \left (e+f x+\frac {\pi }{2}\right )+a\right )^3 \left (c+d \csc \left (e+f x+\frac {\pi }{2}\right )\right )}dx\) |
\(\Big \downarrow \) 4475 |
\(\displaystyle -\frac {a^2 \tan (e+f x) \int \frac {1}{\sqrt {a-a \sec (e+f x)} (\sec (e+f x) a+a)^{7/2} (c+d \sec (e+f x))}d\sec (e+f x)}{f \sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a}}\) |
\(\Big \downarrow \) 115 |
\(\displaystyle -\frac {a^2 \tan (e+f x) \left (-\frac {\int -\frac {a^2 (2 c-5 d+2 d \sec (e+f x))}{\sqrt {a-a \sec (e+f x)} (\sec (e+f x) a+a)^{5/2} (c+d \sec (e+f x))}d\sec (e+f x)}{5 a^3 (c-d)}-\frac {\sqrt {a-a \sec (e+f x)}}{5 a^2 (c-d) (a \sec (e+f x)+a)^{5/2}}\right )}{f \sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a}}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle -\frac {a^2 \tan (e+f x) \left (\frac {\int \frac {a^2 (2 c-5 d+2 d \sec (e+f x))}{\sqrt {a-a \sec (e+f x)} (\sec (e+f x) a+a)^{5/2} (c+d \sec (e+f x))}d\sec (e+f x)}{5 a^3 (c-d)}-\frac {\sqrt {a-a \sec (e+f x)}}{5 a^2 (c-d) (a \sec (e+f x)+a)^{5/2}}\right )}{f \sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a}}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle -\frac {a^2 \tan (e+f x) \left (\frac {\int \frac {2 c-5 d+2 d \sec (e+f x)}{\sqrt {a-a \sec (e+f x)} (\sec (e+f x) a+a)^{5/2} (c+d \sec (e+f x))}d\sec (e+f x)}{5 a (c-d)}-\frac {\sqrt {a-a \sec (e+f x)}}{5 a^2 (c-d) (a \sec (e+f x)+a)^{5/2}}\right )}{f \sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a}}\) |
\(\Big \downarrow \) 169 |
\(\displaystyle -\frac {a^2 \tan (e+f x) \left (\frac {-\frac {\int -\frac {a^2 \left (2 c^2-7 d c+15 d^2+(2 c-7 d) d \sec (e+f x)\right )}{\sqrt {a-a \sec (e+f x)} (\sec (e+f x) a+a)^{3/2} (c+d \sec (e+f x))}d\sec (e+f x)}{3 a^3 (c-d)}-\frac {(2 c-7 d) \sqrt {a-a \sec (e+f x)}}{3 a^2 (c-d) (a \sec (e+f x)+a)^{3/2}}}{5 a (c-d)}-\frac {\sqrt {a-a \sec (e+f x)}}{5 a^2 (c-d) (a \sec (e+f x)+a)^{5/2}}\right )}{f \sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a}}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle -\frac {a^2 \tan (e+f x) \left (\frac {\frac {\int \frac {a^2 \left (2 c^2-7 d c+15 d^2+(2 c-7 d) d \sec (e+f x)\right )}{\sqrt {a-a \sec (e+f x)} (\sec (e+f x) a+a)^{3/2} (c+d \sec (e+f x))}d\sec (e+f x)}{3 a^3 (c-d)}-\frac {(2 c-7 d) \sqrt {a-a \sec (e+f x)}}{3 a^2 (c-d) (a \sec (e+f x)+a)^{3/2}}}{5 a (c-d)}-\frac {\sqrt {a-a \sec (e+f x)}}{5 a^2 (c-d) (a \sec (e+f x)+a)^{5/2}}\right )}{f \sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a}}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle -\frac {a^2 \tan (e+f x) \left (\frac {\frac {\int \frac {2 c^2-7 d c+15 d^2+(2 c-7 d) d \sec (e+f x)}{\sqrt {a-a \sec (e+f x)} (\sec (e+f x) a+a)^{3/2} (c+d \sec (e+f x))}d\sec (e+f x)}{3 a (c-d)}-\frac {(2 c-7 d) \sqrt {a-a \sec (e+f x)}}{3 a^2 (c-d) (a \sec (e+f x)+a)^{3/2}}}{5 a (c-d)}-\frac {\sqrt {a-a \sec (e+f x)}}{5 a^2 (c-d) (a \sec (e+f x)+a)^{5/2}}\right )}{f \sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a}}\) |
\(\Big \downarrow \) 169 |
\(\displaystyle -\frac {a^2 \tan (e+f x) \left (\frac {\frac {-\frac {\int \frac {15 a^2 d^3}{\sqrt {a-a \sec (e+f x)} \sqrt {\sec (e+f x) a+a} (c+d \sec (e+f x))}d\sec (e+f x)}{a^3 (c-d)}-\frac {\left (2 c^2-9 c d+22 d^2\right ) \sqrt {a-a \sec (e+f x)}}{a^2 (c-d) \sqrt {a \sec (e+f x)+a}}}{3 a (c-d)}-\frac {(2 c-7 d) \sqrt {a-a \sec (e+f x)}}{3 a^2 (c-d) (a \sec (e+f x)+a)^{3/2}}}{5 a (c-d)}-\frac {\sqrt {a-a \sec (e+f x)}}{5 a^2 (c-d) (a \sec (e+f x)+a)^{5/2}}\right )}{f \sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a}}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle -\frac {a^2 \tan (e+f x) \left (\frac {\frac {-\frac {15 d^3 \int \frac {1}{\sqrt {a-a \sec (e+f x)} \sqrt {\sec (e+f x) a+a} (c+d \sec (e+f x))}d\sec (e+f x)}{a (c-d)}-\frac {\left (2 c^2-9 c d+22 d^2\right ) \sqrt {a-a \sec (e+f x)}}{a^2 (c-d) \sqrt {a \sec (e+f x)+a}}}{3 a (c-d)}-\frac {(2 c-7 d) \sqrt {a-a \sec (e+f x)}}{3 a^2 (c-d) (a \sec (e+f x)+a)^{3/2}}}{5 a (c-d)}-\frac {\sqrt {a-a \sec (e+f x)}}{5 a^2 (c-d) (a \sec (e+f x)+a)^{5/2}}\right )}{f \sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a}}\) |
\(\Big \downarrow \) 104 |
\(\displaystyle -\frac {a^2 \tan (e+f x) \left (\frac {\frac {-\frac {30 d^3 \int \frac {1}{a (c-d)+\frac {a (c+d) (\sec (e+f x) a+a)}{a-a \sec (e+f x)}}d\frac {\sqrt {\sec (e+f x) a+a}}{\sqrt {a-a \sec (e+f x)}}}{a (c-d)}-\frac {\left (2 c^2-9 c d+22 d^2\right ) \sqrt {a-a \sec (e+f x)}}{a^2 (c-d) \sqrt {a \sec (e+f x)+a}}}{3 a (c-d)}-\frac {(2 c-7 d) \sqrt {a-a \sec (e+f x)}}{3 a^2 (c-d) (a \sec (e+f x)+a)^{3/2}}}{5 a (c-d)}-\frac {\sqrt {a-a \sec (e+f x)}}{5 a^2 (c-d) (a \sec (e+f x)+a)^{5/2}}\right )}{f \sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a}}\) |
\(\Big \downarrow \) 218 |
\(\displaystyle -\frac {a^2 \tan (e+f x) \left (\frac {\frac {-\frac {30 d^3 \arctan \left (\frac {\sqrt {c+d} \sqrt {a \sec (e+f x)+a}}{\sqrt {c-d} \sqrt {a-a \sec (e+f x)}}\right )}{a^2 (c-d)^{3/2} \sqrt {c+d}}-\frac {\left (2 c^2-9 c d+22 d^2\right ) \sqrt {a-a \sec (e+f x)}}{a^2 (c-d) \sqrt {a \sec (e+f x)+a}}}{3 a (c-d)}-\frac {(2 c-7 d) \sqrt {a-a \sec (e+f x)}}{3 a^2 (c-d) (a \sec (e+f x)+a)^{3/2}}}{5 a (c-d)}-\frac {\sqrt {a-a \sec (e+f x)}}{5 a^2 (c-d) (a \sec (e+f x)+a)^{5/2}}\right )}{f \sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a}}\) |
-((a^2*(-1/5*Sqrt[a - a*Sec[e + f*x]]/(a^2*(c - d)*(a + a*Sec[e + f*x])^(5 /2)) + (-1/3*((2*c - 7*d)*Sqrt[a - a*Sec[e + f*x]])/(a^2*(c - d)*(a + a*Se c[e + f*x])^(3/2)) + ((-30*d^3*ArcTan[(Sqrt[c + d]*Sqrt[a + a*Sec[e + f*x] ])/(Sqrt[c - d]*Sqrt[a - a*Sec[e + f*x]])])/(a^2*(c - d)^(3/2)*Sqrt[c + d] ) - ((2*c^2 - 9*c*d + 22*d^2)*Sqrt[a - a*Sec[e + f*x]])/(a^2*(c - d)*Sqrt[ a + a*Sec[e + f*x]]))/(3*a*(c - d)))/(5*a*(c - d)))*Tan[e + f*x])/(f*Sqrt[ a - a*Sec[e + f*x]]*Sqrt[a + a*Sec[e + f*x]]))
3.3.31.3.1 Defintions of rubi rules used
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[(((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_))/((e_.) + (f_.)*(x _)), x_] :> With[{q = Denominator[m]}, Simp[q Subst[Int[x^(q*(m + 1) - 1) /(b*e - a*f - (d*e - c*f)*x^q), x], x, (a + b*x)^(1/q)/(c + d*x)^(1/q)], x] ] /; FreeQ[{a, b, c, d, e, f}, x] && EqQ[m + n + 1, 0] && RationalQ[n] && L tQ[-1, m, 0] && SimplerQ[a + b*x, c + d*x]
Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_)*((e_.) + (f_.)*(x_) )^(p_), x_] :> Simp[b*(a + b*x)^(m + 1)*(c + d*x)^(n + 1)*((e + f*x)^(p + 1 )/((m + 1)*(b*c - a*d)*(b*e - a*f))), x] + Simp[1/((m + 1)*(b*c - a*d)*(b*e - a*f)) Int[(a + b*x)^(m + 1)*(c + d*x)^n*(e + f*x)^p*Simp[a*d*f*(m + 1) - b*(d*e*(m + n + 2) + c*f*(m + p + 2)) - b*d*f*(m + n + p + 3)*x, x], x], x] /; FreeQ[{a, b, c, d, e, f, n, p}, x] && LtQ[m, -1] && IntegersQ[2*m, 2 *n, 2*p]
Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_)*((e_.) + (f_.)*(x_) )^(p_)*((g_.) + (h_.)*(x_)), x_] :> Simp[(b*g - a*h)*(a + b*x)^(m + 1)*(c + d*x)^(n + 1)*((e + f*x)^(p + 1)/((m + 1)*(b*c - a*d)*(b*e - a*f))), x] + S imp[1/((m + 1)*(b*c - a*d)*(b*e - a*f)) Int[(a + b*x)^(m + 1)*(c + d*x)^n *(e + f*x)^p*Simp[(a*d*f*g - b*(d*e + c*f)*g + b*c*e*h)*(m + 1) - (b*g - a* h)*(d*e*(n + 1) + c*f*(p + 1)) - d*f*(b*g - a*h)*(m + n + p + 3)*x, x], x], x] /; FreeQ[{a, b, c, d, e, f, g, h, n, p}, x] && LtQ[m, -1] && IntegersQ[ 2*m, 2*n, 2*p]
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/R t[a/b, 2]], x] /; FreeQ[{a, b}, x] && PosQ[a/b]
Int[(csc[(e_.) + (f_.)*(x_)]*(g_.))^(p_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_)*(csc[(e_.) + (f_.)*(x_)]*(d_.) + (c_))^(n_), x_Symbol] :> Simp[a ^2*g*(Cot[e + f*x]/(f*Sqrt[a + b*Csc[e + f*x]]*Sqrt[a - b*Csc[e + f*x]])) Subst[Int[(g*x)^(p - 1)*(a + b*x)^(m - 1/2)*((c + d*x)^n/Sqrt[a - b*x]), x ], x, Csc[e + f*x]], x] /; FreeQ[{a, b, c, d, e, f, g, m, n, p}, x] && NeQ[ b*c - a*d, 0] && EqQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0] && (EqQ[p, 1] || In tegerQ[m - 1/2])
Time = 0.73 (sec) , antiderivative size = 203, normalized size of antiderivative = 1.12
method | result | size |
derivativedivides | \(\frac {\frac {\frac {\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{5} c^{2}}{5}-\frac {2 \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{5} c d}{5}+\frac {\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{5} d^{2}}{5}-\frac {2 c^{2} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}}{3}+2 \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3} c d -\frac {4 \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3} d^{2}}{3}+\tan \left (\frac {f x}{2}+\frac {e}{2}\right ) c^{2}-4 \tan \left (\frac {f x}{2}+\frac {e}{2}\right ) c d +7 \tan \left (\frac {f x}{2}+\frac {e}{2}\right ) d^{2}}{\left (c -d \right )^{3}}-\frac {8 d^{3} \operatorname {arctanh}\left (\frac {\left (c -d \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{\sqrt {\left (c +d \right ) \left (c -d \right )}}\right )}{\left (c -d \right )^{3} \sqrt {\left (c +d \right ) \left (c -d \right )}}}{4 f \,a^{3}}\) | \(203\) |
default | \(\frac {\frac {\frac {\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{5} c^{2}}{5}-\frac {2 \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{5} c d}{5}+\frac {\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{5} d^{2}}{5}-\frac {2 c^{2} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}}{3}+2 \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3} c d -\frac {4 \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3} d^{2}}{3}+\tan \left (\frac {f x}{2}+\frac {e}{2}\right ) c^{2}-4 \tan \left (\frac {f x}{2}+\frac {e}{2}\right ) c d +7 \tan \left (\frac {f x}{2}+\frac {e}{2}\right ) d^{2}}{\left (c -d \right )^{3}}-\frac {8 d^{3} \operatorname {arctanh}\left (\frac {\left (c -d \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{\sqrt {\left (c +d \right ) \left (c -d \right )}}\right )}{\left (c -d \right )^{3} \sqrt {\left (c +d \right ) \left (c -d \right )}}}{4 f \,a^{3}}\) | \(203\) |
risch | \(\frac {2 i \left (15 c^{2} {\mathrm e}^{4 i \left (f x +e \right )}-45 c d \,{\mathrm e}^{4 i \left (f x +e \right )}+45 d^{2} {\mathrm e}^{4 i \left (f x +e \right )}+30 c^{2} {\mathrm e}^{3 i \left (f x +e \right )}-105 c d \,{\mathrm e}^{3 i \left (f x +e \right )}+135 d^{2} {\mathrm e}^{3 i \left (f x +e \right )}+40 c^{2} {\mathrm e}^{2 i \left (f x +e \right )}-135 c d \,{\mathrm e}^{2 i \left (f x +e \right )}+185 d^{2} {\mathrm e}^{2 i \left (f x +e \right )}+20 c^{2} {\mathrm e}^{i \left (f x +e \right )}-75 d \,{\mathrm e}^{i \left (f x +e \right )} c +115 d^{2} {\mathrm e}^{i \left (f x +e \right )}+7 c^{2}-24 c d +32 d^{2}\right )}{15 f \,a^{3} \left (c -d \right )^{3} \left ({\mathrm e}^{i \left (f x +e \right )}+1\right )^{5}}+\frac {d^{3} \ln \left ({\mathrm e}^{i \left (f x +e \right )}+\frac {-i c^{2}+i d^{2}+\sqrt {c^{2}-d^{2}}\, d}{c \sqrt {c^{2}-d^{2}}}\right )}{\sqrt {c^{2}-d^{2}}\, \left (c -d \right )^{3} f \,a^{3}}-\frac {d^{3} \ln \left ({\mathrm e}^{i \left (f x +e \right )}+\frac {i c^{2}-i d^{2}+\sqrt {c^{2}-d^{2}}\, d}{\sqrt {c^{2}-d^{2}}\, c}\right )}{\sqrt {c^{2}-d^{2}}\, \left (c -d \right )^{3} f \,a^{3}}\) | \(371\) |
1/4/f/a^3*(1/(c-d)^3*(1/5*tan(1/2*f*x+1/2*e)^5*c^2-2/5*tan(1/2*f*x+1/2*e)^ 5*c*d+1/5*tan(1/2*f*x+1/2*e)^5*d^2-2/3*c^2*tan(1/2*f*x+1/2*e)^3+2*tan(1/2* f*x+1/2*e)^3*c*d-4/3*tan(1/2*f*x+1/2*e)^3*d^2+tan(1/2*f*x+1/2*e)*c^2-4*tan (1/2*f*x+1/2*e)*c*d+7*tan(1/2*f*x+1/2*e)*d^2)-8*d^3/(c-d)^3/((c+d)*(c-d))^ (1/2)*arctanh((c-d)*tan(1/2*f*x+1/2*e)/((c+d)*(c-d))^(1/2)))
Leaf count of result is larger than twice the leaf count of optimal. 472 vs. \(2 (166) = 332\).
Time = 0.30 (sec) , antiderivative size = 1001, normalized size of antiderivative = 5.53 \[ \int \frac {\sec (e+f x)}{(a+a \sec (e+f x))^3 (c+d \sec (e+f x))} \, dx=\left [-\frac {15 \, {\left (d^{3} \cos \left (f x + e\right )^{3} + 3 \, d^{3} \cos \left (f x + e\right )^{2} + 3 \, d^{3} \cos \left (f x + e\right ) + d^{3}\right )} \sqrt {c^{2} - d^{2}} \log \left (\frac {2 \, c d \cos \left (f x + e\right ) - {\left (c^{2} - 2 \, d^{2}\right )} \cos \left (f x + e\right )^{2} + 2 \, \sqrt {c^{2} - d^{2}} {\left (d \cos \left (f x + e\right ) + c\right )} \sin \left (f x + e\right ) + 2 \, c^{2} - d^{2}}{c^{2} \cos \left (f x + e\right )^{2} + 2 \, c d \cos \left (f x + e\right ) + d^{2}}\right ) - 2 \, {\left (2 \, c^{4} - 9 \, c^{3} d + 20 \, c^{2} d^{2} + 9 \, c d^{3} - 22 \, d^{4} + {\left (7 \, c^{4} - 24 \, c^{3} d + 25 \, c^{2} d^{2} + 24 \, c d^{3} - 32 \, d^{4}\right )} \cos \left (f x + e\right )^{2} + 3 \, {\left (2 \, c^{4} - 9 \, c^{3} d + 15 \, c^{2} d^{2} + 9 \, c d^{3} - 17 \, d^{4}\right )} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{30 \, {\left ({\left (a^{3} c^{5} - 3 \, a^{3} c^{4} d + 2 \, a^{3} c^{3} d^{2} + 2 \, a^{3} c^{2} d^{3} - 3 \, a^{3} c d^{4} + a^{3} d^{5}\right )} f \cos \left (f x + e\right )^{3} + 3 \, {\left (a^{3} c^{5} - 3 \, a^{3} c^{4} d + 2 \, a^{3} c^{3} d^{2} + 2 \, a^{3} c^{2} d^{3} - 3 \, a^{3} c d^{4} + a^{3} d^{5}\right )} f \cos \left (f x + e\right )^{2} + 3 \, {\left (a^{3} c^{5} - 3 \, a^{3} c^{4} d + 2 \, a^{3} c^{3} d^{2} + 2 \, a^{3} c^{2} d^{3} - 3 \, a^{3} c d^{4} + a^{3} d^{5}\right )} f \cos \left (f x + e\right ) + {\left (a^{3} c^{5} - 3 \, a^{3} c^{4} d + 2 \, a^{3} c^{3} d^{2} + 2 \, a^{3} c^{2} d^{3} - 3 \, a^{3} c d^{4} + a^{3} d^{5}\right )} f\right )}}, -\frac {15 \, {\left (d^{3} \cos \left (f x + e\right )^{3} + 3 \, d^{3} \cos \left (f x + e\right )^{2} + 3 \, d^{3} \cos \left (f x + e\right ) + d^{3}\right )} \sqrt {-c^{2} + d^{2}} \arctan \left (-\frac {\sqrt {-c^{2} + d^{2}} {\left (d \cos \left (f x + e\right ) + c\right )}}{{\left (c^{2} - d^{2}\right )} \sin \left (f x + e\right )}\right ) - {\left (2 \, c^{4} - 9 \, c^{3} d + 20 \, c^{2} d^{2} + 9 \, c d^{3} - 22 \, d^{4} + {\left (7 \, c^{4} - 24 \, c^{3} d + 25 \, c^{2} d^{2} + 24 \, c d^{3} - 32 \, d^{4}\right )} \cos \left (f x + e\right )^{2} + 3 \, {\left (2 \, c^{4} - 9 \, c^{3} d + 15 \, c^{2} d^{2} + 9 \, c d^{3} - 17 \, d^{4}\right )} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{15 \, {\left ({\left (a^{3} c^{5} - 3 \, a^{3} c^{4} d + 2 \, a^{3} c^{3} d^{2} + 2 \, a^{3} c^{2} d^{3} - 3 \, a^{3} c d^{4} + a^{3} d^{5}\right )} f \cos \left (f x + e\right )^{3} + 3 \, {\left (a^{3} c^{5} - 3 \, a^{3} c^{4} d + 2 \, a^{3} c^{3} d^{2} + 2 \, a^{3} c^{2} d^{3} - 3 \, a^{3} c d^{4} + a^{3} d^{5}\right )} f \cos \left (f x + e\right )^{2} + 3 \, {\left (a^{3} c^{5} - 3 \, a^{3} c^{4} d + 2 \, a^{3} c^{3} d^{2} + 2 \, a^{3} c^{2} d^{3} - 3 \, a^{3} c d^{4} + a^{3} d^{5}\right )} f \cos \left (f x + e\right ) + {\left (a^{3} c^{5} - 3 \, a^{3} c^{4} d + 2 \, a^{3} c^{3} d^{2} + 2 \, a^{3} c^{2} d^{3} - 3 \, a^{3} c d^{4} + a^{3} d^{5}\right )} f\right )}}\right ] \]
[-1/30*(15*(d^3*cos(f*x + e)^3 + 3*d^3*cos(f*x + e)^2 + 3*d^3*cos(f*x + e) + d^3)*sqrt(c^2 - d^2)*log((2*c*d*cos(f*x + e) - (c^2 - 2*d^2)*cos(f*x + e)^2 + 2*sqrt(c^2 - d^2)*(d*cos(f*x + e) + c)*sin(f*x + e) + 2*c^2 - d^2)/ (c^2*cos(f*x + e)^2 + 2*c*d*cos(f*x + e) + d^2)) - 2*(2*c^4 - 9*c^3*d + 20 *c^2*d^2 + 9*c*d^3 - 22*d^4 + (7*c^4 - 24*c^3*d + 25*c^2*d^2 + 24*c*d^3 - 32*d^4)*cos(f*x + e)^2 + 3*(2*c^4 - 9*c^3*d + 15*c^2*d^2 + 9*c*d^3 - 17*d^ 4)*cos(f*x + e))*sin(f*x + e))/((a^3*c^5 - 3*a^3*c^4*d + 2*a^3*c^3*d^2 + 2 *a^3*c^2*d^3 - 3*a^3*c*d^4 + a^3*d^5)*f*cos(f*x + e)^3 + 3*(a^3*c^5 - 3*a^ 3*c^4*d + 2*a^3*c^3*d^2 + 2*a^3*c^2*d^3 - 3*a^3*c*d^4 + a^3*d^5)*f*cos(f*x + e)^2 + 3*(a^3*c^5 - 3*a^3*c^4*d + 2*a^3*c^3*d^2 + 2*a^3*c^2*d^3 - 3*a^3 *c*d^4 + a^3*d^5)*f*cos(f*x + e) + (a^3*c^5 - 3*a^3*c^4*d + 2*a^3*c^3*d^2 + 2*a^3*c^2*d^3 - 3*a^3*c*d^4 + a^3*d^5)*f), -1/15*(15*(d^3*cos(f*x + e)^3 + 3*d^3*cos(f*x + e)^2 + 3*d^3*cos(f*x + e) + d^3)*sqrt(-c^2 + d^2)*arcta n(-sqrt(-c^2 + d^2)*(d*cos(f*x + e) + c)/((c^2 - d^2)*sin(f*x + e))) - (2* c^4 - 9*c^3*d + 20*c^2*d^2 + 9*c*d^3 - 22*d^4 + (7*c^4 - 24*c^3*d + 25*c^2 *d^2 + 24*c*d^3 - 32*d^4)*cos(f*x + e)^2 + 3*(2*c^4 - 9*c^3*d + 15*c^2*d^2 + 9*c*d^3 - 17*d^4)*cos(f*x + e))*sin(f*x + e))/((a^3*c^5 - 3*a^3*c^4*d + 2*a^3*c^3*d^2 + 2*a^3*c^2*d^3 - 3*a^3*c*d^4 + a^3*d^5)*f*cos(f*x + e)^3 + 3*(a^3*c^5 - 3*a^3*c^4*d + 2*a^3*c^3*d^2 + 2*a^3*c^2*d^3 - 3*a^3*c*d^4 + a^3*d^5)*f*cos(f*x + e)^2 + 3*(a^3*c^5 - 3*a^3*c^4*d + 2*a^3*c^3*d^2 + ...
\[ \int \frac {\sec (e+f x)}{(a+a \sec (e+f x))^3 (c+d \sec (e+f x))} \, dx=\frac {\int \frac {\sec {\left (e + f x \right )}}{c \sec ^{3}{\left (e + f x \right )} + 3 c \sec ^{2}{\left (e + f x \right )} + 3 c \sec {\left (e + f x \right )} + c + d \sec ^{4}{\left (e + f x \right )} + 3 d \sec ^{3}{\left (e + f x \right )} + 3 d \sec ^{2}{\left (e + f x \right )} + d \sec {\left (e + f x \right )}}\, dx}{a^{3}} \]
Integral(sec(e + f*x)/(c*sec(e + f*x)**3 + 3*c*sec(e + f*x)**2 + 3*c*sec(e + f*x) + c + d*sec(e + f*x)**4 + 3*d*sec(e + f*x)**3 + 3*d*sec(e + f*x)** 2 + d*sec(e + f*x)), x)/a**3
Exception generated. \[ \int \frac {\sec (e+f x)}{(a+a \sec (e+f x))^3 (c+d \sec (e+f x))} \, dx=\text {Exception raised: ValueError} \]
Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'assume' command before evaluation *may* help (example of legal syntax is 'assume(4*c^2-4*d^2>0)', see `assume?` f or more de
Leaf count of result is larger than twice the leaf count of optimal. 471 vs. \(2 (166) = 332\).
Time = 0.36 (sec) , antiderivative size = 471, normalized size of antiderivative = 2.60 \[ \int \frac {\sec (e+f x)}{(a+a \sec (e+f x))^3 (c+d \sec (e+f x))} \, dx=-\frac {\frac {120 \, {\left (\pi \left \lfloor \frac {f x + e}{2 \, \pi } + \frac {1}{2} \right \rfloor \mathrm {sgn}\left (-2 \, c + 2 \, d\right ) + \arctan \left (-\frac {c \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - d \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )}{\sqrt {-c^{2} + d^{2}}}\right )\right )} d^{3}}{{\left (a^{3} c^{3} - 3 \, a^{3} c^{2} d + 3 \, a^{3} c d^{2} - a^{3} d^{3}\right )} \sqrt {-c^{2} + d^{2}}} - \frac {3 \, a^{12} c^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{5} - 12 \, a^{12} c^{3} d \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{5} + 18 \, a^{12} c^{2} d^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{5} - 12 \, a^{12} c d^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{5} + 3 \, a^{12} d^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{5} - 10 \, a^{12} c^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} + 50 \, a^{12} c^{3} d \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} - 90 \, a^{12} c^{2} d^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} + 70 \, a^{12} c d^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} - 20 \, a^{12} d^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} + 15 \, a^{12} c^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 90 \, a^{12} c^{3} d \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 240 \, a^{12} c^{2} d^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 270 \, a^{12} c d^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 105 \, a^{12} d^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )}{a^{15} c^{5} - 5 \, a^{15} c^{4} d + 10 \, a^{15} c^{3} d^{2} - 10 \, a^{15} c^{2} d^{3} + 5 \, a^{15} c d^{4} - a^{15} d^{5}}}{60 \, f} \]
-1/60*(120*(pi*floor(1/2*(f*x + e)/pi + 1/2)*sgn(-2*c + 2*d) + arctan(-(c* tan(1/2*f*x + 1/2*e) - d*tan(1/2*f*x + 1/2*e))/sqrt(-c^2 + d^2)))*d^3/((a^ 3*c^3 - 3*a^3*c^2*d + 3*a^3*c*d^2 - a^3*d^3)*sqrt(-c^2 + d^2)) - (3*a^12*c ^4*tan(1/2*f*x + 1/2*e)^5 - 12*a^12*c^3*d*tan(1/2*f*x + 1/2*e)^5 + 18*a^12 *c^2*d^2*tan(1/2*f*x + 1/2*e)^5 - 12*a^12*c*d^3*tan(1/2*f*x + 1/2*e)^5 + 3 *a^12*d^4*tan(1/2*f*x + 1/2*e)^5 - 10*a^12*c^4*tan(1/2*f*x + 1/2*e)^3 + 50 *a^12*c^3*d*tan(1/2*f*x + 1/2*e)^3 - 90*a^12*c^2*d^2*tan(1/2*f*x + 1/2*e)^ 3 + 70*a^12*c*d^3*tan(1/2*f*x + 1/2*e)^3 - 20*a^12*d^4*tan(1/2*f*x + 1/2*e )^3 + 15*a^12*c^4*tan(1/2*f*x + 1/2*e) - 90*a^12*c^3*d*tan(1/2*f*x + 1/2*e ) + 240*a^12*c^2*d^2*tan(1/2*f*x + 1/2*e) - 270*a^12*c*d^3*tan(1/2*f*x + 1 /2*e) + 105*a^12*d^4*tan(1/2*f*x + 1/2*e))/(a^15*c^5 - 5*a^15*c^4*d + 10*a ^15*c^3*d^2 - 10*a^15*c^2*d^3 + 5*a^15*c*d^4 - a^15*d^5))/f
Time = 13.80 (sec) , antiderivative size = 228, normalized size of antiderivative = 1.26 \[ \int \frac {\sec (e+f x)}{(a+a \sec (e+f x))^3 (c+d \sec (e+f x))} \, dx=\frac {\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\,\left (\frac {3}{4\,a^3\,\left (c-d\right )}-\frac {\left (c+d\right )\,\left (\frac {3}{4\,a^3\,\left (c-d\right )}-\frac {c+d}{4\,a^3\,{\left (c-d\right )}^2}\right )}{c-d}\right )}{f}-\frac {{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^3\,\left (\frac {1}{4\,a^3\,\left (c-d\right )}-\frac {c+d}{12\,a^3\,{\left (c-d\right )}^2}\right )}{f}+\frac {{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^5}{20\,a^3\,f\,\left (c-d\right )}-\frac {2\,d^3\,\mathrm {atanh}\left (\frac {\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\,\left (2\,c-2\,d\right )\,\left (a^3\,c^3-3\,a^3\,c^2\,d+3\,a^3\,c\,d^2-a^3\,d^3\right )}{2\,a^3\,\sqrt {c+d}\,{\left (c-d\right )}^{7/2}}\right )}{a^3\,f\,\sqrt {c+d}\,{\left (c-d\right )}^{7/2}} \]
(tan(e/2 + (f*x)/2)*(3/(4*a^3*(c - d)) - ((c + d)*(3/(4*a^3*(c - d)) - (c + d)/(4*a^3*(c - d)^2)))/(c - d)))/f - (tan(e/2 + (f*x)/2)^3*(1/(4*a^3*(c - d)) - (c + d)/(12*a^3*(c - d)^2)))/f + tan(e/2 + (f*x)/2)^5/(20*a^3*f*(c - d)) - (2*d^3*atanh((tan(e/2 + (f*x)/2)*(2*c - 2*d)*(a^3*c^3 - a^3*d^3 + 3*a^3*c*d^2 - 3*a^3*c^2*d))/(2*a^3*(c + d)^(1/2)*(c - d)^(7/2))))/(a^3*f* (c + d)^(1/2)*(c - d)^(7/2))